/**
 * @author liangxi
 * @since 2023/12/21
 */

#ifndef DESIGNPATTERN_DINERMENUITERATOR_H
#define DESIGNPATTERN_DINERMENUITERATOR_H

#include <vector>
#include "../Iterator.h"

namespace Iterator::Transition {

    class DinerMenuIterator : public Iterator {
    public:
        explicit DinerMenuIterator(const std::vector<std::shared_ptr<MenuItem>> &items) : items(items) {}

        bool hasNext() override;

        std::shared_ptr<MenuItem> next() override;

    private:
        std::vector<std::shared_ptr<MenuItem>> items;
        int position = 0;

    };

} // Transition

#endif //DESIGNPATTERN_DINERMENUITERATOR_H
